Optimal. Leaf size=87 \[ \frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 a^2 c f}+\frac {3 \sin (e+f x) \cos (e+f x)}{8 a^2 c f}+\frac {3 x}{8 a^2 c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {3522, 3486, 2635, 8} \[ \frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 a^2 c f}+\frac {3 \sin (e+f x) \cos (e+f x)}{8 a^2 c f}+\frac {3 x}{8 a^2 c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3486
Rule 3522
Rubi steps
\begin {align*} \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx &=\frac {\int \cos ^4(e+f x) (c-i c \tan (e+f x)) \, dx}{a^2 c^2}\\ &=\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {\int \cos ^4(e+f x) \, dx}{a^2 c}\\ &=\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c f}+\frac {3 \int \cos ^2(e+f x) \, dx}{4 a^2 c}\\ &=\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {3 \cos (e+f x) \sin (e+f x)}{8 a^2 c f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c f}+\frac {3 \int 1 \, dx}{8 a^2 c}\\ &=\frac {3 x}{8 a^2 c}+\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {3 \cos (e+f x) \sin (e+f x)}{8 a^2 c f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.15, size = 81, normalized size = 0.93 \[ -\frac {2 \cos (2 (e+f x))-12 f x \tan (e+f x)+6 i \tan (e+f x)+3 i \sin (3 (e+f x)) \sec (e+f x)+12 i f x-7}{32 a^2 c f (\tan (e+f x)-i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 57, normalized size = 0.66 \[ \frac {{\left (12 \, f x e^{\left (4 i \, f x + 4 i \, e\right )} - 2 i \, e^{\left (6 i \, f x + 6 i \, e\right )} + 6 i \, e^{\left (2 i \, f x + 2 i \, e\right )} + i\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{32 \, a^{2} c f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.97, size = 118, normalized size = 1.36 \[ -\frac {\frac {6 i \, \log \left (i \, \tan \left (f x + e\right ) + 1\right )}{a^{2} c} - \frac {6 i \, \log \left (i \, \tan \left (f x + e\right ) - 1\right )}{a^{2} c} + \frac {2 \, {\left (3 \, \tan \left (f x + e\right ) + 5 i\right )}}{a^{2} c {\left (-i \, \tan \left (f x + e\right ) + 1\right )}} + \frac {-9 i \, \tan \left (f x + e\right )^{2} - 26 \, \tan \left (f x + e\right ) + 21 i}{a^{2} c {\left (\tan \left (f x + e\right ) - i\right )}^{2}}}{32 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.31, size = 113, normalized size = 1.30 \[ \frac {3 i \ln \left (\tan \left (f x +e \right )+i\right )}{16 f \,a^{2} c}+\frac {1}{8 f \,a^{2} c \left (\tan \left (f x +e \right )+i\right )}-\frac {3 i \ln \left (\tan \left (f x +e \right )-i\right )}{16 f \,a^{2} c}-\frac {i}{8 f \,a^{2} c \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {1}{4 f \,a^{2} c \left (\tan \left (f x +e \right )-i\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.75, size = 66, normalized size = 0.76 \[ \frac {3\,x}{8\,a^2\,c}-\frac {\frac {3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{8}-\frac {\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}}{8}+\frac {1}{4}}{a^2\,c\,f\,{\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2\,\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.36, size = 182, normalized size = 2.09 \[ \begin {cases} - \frac {\left (512 i a^{4} c^{2} f^{2} e^{8 i e} e^{2 i f x} - 1536 i a^{4} c^{2} f^{2} e^{4 i e} e^{- 2 i f x} - 256 i a^{4} c^{2} f^{2} e^{2 i e} e^{- 4 i f x}\right ) e^{- 6 i e}}{8192 a^{6} c^{3} f^{3}} & \text {for}\: 8192 a^{6} c^{3} f^{3} e^{6 i e} \neq 0 \\x \left (\frac {\left (e^{6 i e} + 3 e^{4 i e} + 3 e^{2 i e} + 1\right ) e^{- 4 i e}}{8 a^{2} c} - \frac {3}{8 a^{2} c}\right ) & \text {otherwise} \end {cases} + \frac {3 x}{8 a^{2} c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________